package com.endoc.designpattern.chain;

public class HolidayDiscount extends AbstractChainDiscount {

    public HolidayDiscount(AbstractChainDiscount nextAbstractChainDiscount) {
        super(nextAbstractChainDiscount);
    }

    @Override
    public int calculate(int money) {
        if(money>20){//满20减5优惠
            System.out.println("节假日满20减5");
            money-=5;
        }
        return super.calculate(money);
    }
}
